<table class="table table-togglable table-hover" style="word-break: keep-all;">
<thead>
<tr>
    <th data-toggle="true">编号</th>
    <th data-hide="phone">名称</th>
    <th data-hide="phone,tablet">分组</th>
    <th data-hide="phone,tablet">部门</th>
    <th data-hide="">邮箱</th>
    <th data-hide="phone,tablet">手机号</th>
    <th data-hide="phone,tablet">状态</th>
    <th data-hide="phone">操作</th>
</tr>
</thead>
<tbody>
<?spa foreach(it.list as key => item): ?>
<tr>
    <td>{{= item.id }}</td>
    <td><a >{{= item.name }}</a></td>
    <td>
        {{ for(var i in item.group){ }}
        {{= item.group[i]['name'] }} &nbsp;
        {{ } }}
    </td>
    <td> - </td>
    <td>{{= item.email }}</td>
    <td>{{= item.mobile }}</td>
    <td>{{= (item.status == 1)?"正常":"锁定" }}</td>
    <td >
        <button type="button" class="btn btn-default btn-xs" onclick='editMember("{{= item.id }}")'><i class="icon-hat position-left"></i>编辑</button>
        <button type="button" class="btn btn-default btn-xs" onclick='deleteMember("{{= item.id }}")'><i class="icon-cross2 position-left"></i>删除</button>
    </td>
</tr>
<?spa endForeach; ?>

</tbody>
</table>
<script>
    var editMember = function(id){
        Alpaca.to("#/main/admin/memberEditView/"+id,{id:id});
    };

    var deleteMember = function(id){
        Alpaca.to("#/main/admin/memberDelete/"+id,{id:id});
    };
</script>